-- GENERATED SPELL FOR [Anvilrage Captain] --


function spell0_8903(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(13730,pUnit)
pUnit:RegisterEvent('Sorts_8903', 30280, 1)
end

function spell1_8903(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(13737,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8903', 5302, 1)
end

function spell2_8903(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(11972,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8903', 8275, 1)
end

function spell3_8903(pUnit, Event) --@Shield Block,Self--
pUnit:FullCastSpellOnTarget(12169,pUnit)
pUnit:RegisterEvent('Sorts_8903', 5303, 1)
end

function Sorts_8903(pUnit, Event)
local choix_sorts_8903 = math.random(0, 3)
if choix_sorts_8903 == 0 then
pUnit:RegisterEvent('spell0_8903', 1, 1)
end
if choix_sorts_8903 == 1 then
pUnit:RegisterEvent('spell1_8903', 1, 1)
end
if choix_sorts_8903 == 2 then
pUnit:RegisterEvent('spell2_8903', 1, 1)
end
if choix_sorts_8903 == 3 then
pUnit:RegisterEvent('spell3_8903', 1, 1)
end
end

function mob8903_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8903', math.random(1500, 3000), 1)
end

function mob8903_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8903_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8903_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8903, 1, 'mob8903_Action')
RegisterUnitEvent(8903, 2, 'mob8903_Leave')
RegisterUnitEvent(8903, 3, 'mob8903_Kill')
RegisterUnitEvent(8903, 4, 'mob8903_Die')
